From: Marco Trevisan (TreviƱo) Date: Wed, 15 Apr 2026 21:24:25 +0000 (+0200) Subject: dash: Use connectObject to track signal connection to global objects X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~10^2^2~33 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=187f27837a331675d322a2065745dfeab4ec501e;p=gnome-shell.git dash: Use connectObject to track signal connection to global objects While the dash is never destroyed in vanilla gnome shell, various extensions (such as dash-to-dock) are using this code, potentially for every monitor. And so we should make sure that the signals are disconnected when the actor is destroyed. Part-of: --- diff --git a/js/ui/dash.js b/js/ui/dash.js index 1a0a84142..970bf9400 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -378,10 +378,13 @@ export const Dash = GObject.registerClass({ this._workId = Main.initializeDeferredWork(this._box, this._redisplay.bind(this)); this._appSystem = Shell.AppSystem.get_default(); + this._appSystem.connectObject( + 'installed-changed', () => this._queueRedisplay(), + 'app-state-changed', () => this._queueRedisplay(), + this); - this._appSystem.connect('installed-changed', () => this._queueRedisplay()); - AppFavorites.getAppFavorites().connect('changed', this._queueRedisplay.bind(this)); - this._appSystem.connect('app-state-changed', this._queueRedisplay.bind(this)); + AppFavorites.getAppFavorites().connectObject('changed', + () => this._queueRedisplay(), this); Main.overview.connectObject( 'item-drag-begin', () => this._onItemDragBegin(),